<nav id="navbar" th:fragment="navbar" class="navbar navbar-default ">
    <div class="pb-container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
							<span class="sr-only">
								导航
							</span>
                <span class="icon-bar">
							</span>
                <span class="icon-bar">
							</span>
                <span class="icon-bar">
							</span>
            </button>

            <a class="logo-a" th:href="@{/}">
                <img th:src="@{/favicon.ico}" alt="logo"/>
            </a>

            <!-- 屏蔽 iframe -->
            <div style="width:280px;height:50px;position:absolute;filter:alpha(opacity=0);top:0;left:0;"></div>
            <!--    2345天气插件官网            https://tianqi.2345.com/plugin/-->
            <iframe class="m-mobile-show-weather" style="padding-left: 8px;padding-top: 8px;" allowtransparency="true" frameborder="0"
                    width="155" height="40" scrolling="no"
                    src="//tianqi.2345.com/plugin/widget/index.htm?s=3&z=2&t=0&v=0&d=3&bd=0&k=&f=&ltf=009944&htf=cc0000&q=1&e=1&a=1&c=54511&w=180&h=36&align=left"></iframe>

        </div>

        <div class="collapse navbar-collapse navbar-right" aria-expanded="false">
            <ul class="nav navbar-nav">

                <!--从数据库取的导航-->
                <li th:each="category:${mtoCategoryList}"
                    th:class="${category.id==categoryId ? 'active':(#lists.isEmpty(category.children)?'':'dropdown')}">
                    <a th:if="${category.pid==null||category.pid==0}"
                       th:href="@{${not #lists.isEmpty(category.children) || category.type != 0 ? category.pageUrl : ('/blog/category/' + category.id)}}"
                       th:class="${#lists.isEmpty(category.children)?'':'dropdown-toggle'}"
                       th:data-toggle="${#lists.isEmpty(category.children)?'':'dropdown'}">
                        <span th:class="${category.icon}" th:text="${category.name}"></span>
                        <b th:if="${not #lists.isEmpty(category.children)}" class="caret"></b>
                    </a>
                    <ul th:if="${not #lists.isEmpty(category.children)}" class="dropdown-menu">
                        <li th:each="node:${category.children}"><a
                                th:href="@{${node.type==1 ? node.pageUrl : ('/blog/category/' + node.id)}}"
                                th:class="${node.icon}"
                                th:text="${node.name}"></a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>

    <style type="text/css">
        @media screen and (max-width: 1100px) {
            .m-mobile-show-weather {
                height: 40px !important;
                width: 150px !important;
            }
        }
    </style>

</nav>
